export {};
/* 
    interface 用来描述对象的属性，与 type 是一样

*/
{
  type Point2d = {
    x: number;
    y: number;
  };
  // type 继承, 类型名 & {要添加的属性}
  type Point3d = Point2d & { z: number };
  const obj: Point3d = {
    x: 100,
    y: 100,
    z: 200,
  };
}
{
  interface Point2d {
    x: number;
    y: number;
  }

  //  interface继承，通过 extends 类型名 {要添加的属性}
  interface Point3d extends Point2d {
    z: number;
  }

  const obj: Point3d = {
    x: 100,
    y: 100,
    z: 200,
  };
}
